package com.arellomobile.android.push.tags;

import android.content.Context;
import android.os.AsyncTask;
import com.arellomobile.android.push.PushManager;
import com.arellomobile.android.push.exception.PushWooshException;
import java.util.Map;

public abstract class SendPushTagsAbstractAsyncTask extends AsyncTask<Map<String, Object>, Void, Map<String, String>>
  implements SendPushTagsCallBack
{
  private Context mContext;
  private PushWooshException mError;

  public SendPushTagsAbstractAsyncTask(Context paramContext)
  {
    this.mContext = paramContext;
  }

  protected Map<String, String> doInBackground(Map<String, Object>[] paramArrayOfMap)
  {
    try
    {
      if (paramArrayOfMap.length != 1)
        throw new PushWooshException("Wrong parameters");
    }
    catch (PushWooshException localPushWooshException)
    {
      this.mError = localPushWooshException;
      this.mContext = null;
      return null;
    }
    Map localMap = PushManager.sendTagsFromBG(this.mContext, paramArrayOfMap[0]);
    this.mContext = null;
    return localMap;
  }

  protected void onPostExecute(Map<String, String> paramMap)
  {
    super.onPostExecute(paramMap);
    if (this.mError != null)
    {
      onSentTagsError(this.mError);
      return;
    }
    onSentTagsSuccess(paramMap);
  }

  protected void onPreExecute()
  {
    super.onPreExecute();
    taskStarted();
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.arellomobile.android.push.tags.SendPushTagsAbstractAsyncTask
 * JD-Core Version:    0.6.2
 */